home *** CD-ROM | disk | FTP | other *** search
- /*==============================================================================
- Project: POV-Ray
-
- Version: 3
-
- File: ImageWindow.h
-
- Description:
- This file contains the Macintosh Image window routines for POV-Ray.
- ------------------------------------------------------------------------------
- Authors:
- Jim Nitchals, David Harr, Eduard [esp] Schwan
- ------------------------------------------------------------------------------
- from Persistence of Vision(tm) Ray Tracer
- Copyright 1996 Persistence of Vision Team
- ------------------------------------------------------------------------------
- NOTICE: This source code file is provided so that users may experiment
- with enhancements to POV-Ray and to port the software to platforms other
- than those supported by the POV-Ray Team. There are strict rules under
- which you are permitted to use this file. The rules are in the file
- named POVLEGAL.DOC which should be distributed with this file. If
- POVLEGAL.DOC is not available or for more info please contact the POV-Ray
- Team Coordinator by leaving a message in CompuServe's Graphics Developer's
- Forum. The latest version of POV-Ray may be found there as well.
-
- This program is based on the popular DKB raytracer version 2.12.
- DKBTrace was originally written by David K. Buck.
- DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins.
- ------------------------------------------------------------------------------
- Change History:
- 930610 [esp] Created
- 931001 [esp] version 2.0 finished (Released on 10/4/93)
- 960706 [esp] Changed offscreen from old pixmaps to new GWorlds, now images can be bigger than 4Kx4K!
- ==============================================================================*/
-
- #if !defined(IMAGEWINDOW_H)
- #define IMAGEWINDOW_H
-
-
- /*==== POV-Ray std headers ====*/
- #include "config.h"
-
- #include "TextEditor.h" // gSrcWind_...
-
-
- /*==== Standard C headers ====*/
- #include <stdlib.h>
- #include <setjmp.h>
-
- /*==== Macintosh-specific headers ====*/
- #include <Types.h>
- #include <Controls.h>
- #include <Dialogs.h>
- #include <Files.h>
- #include <Memory.h>
- #include <PictUtils.h>
- #include <QuickDraw.h>
- #include <Resources.h>
- #include <Windows.h>
- #include <scrap.h>
- #include <Folders.h>
- #include <errors.h> /* dupFNErr, etc */
- #include <fonts.h>
- #include <string.h> /* strcpy/cat */
- #include <toolutils.h> /* BitTst, etc */
- #include <QuickTimeComponents.h> // ComponentInstance
-
- #if defined (applec)
- #include <strings.h> /* p2cstr */
- #endif // applec
-
-
- /*==== definitions ====*/
- #define kNoAnimSuffix -1 // for saveOutputFile()
-
-
- /*==== globals ====*/
- extern WindowPtr gImageWindowPtr; // the image window
- extern Boolean gImageWindIsValid; // true if valid stuff in window
- extern Boolean gUsingCustomPalette; // does the user desire to use color q?
- extern int gColorQuantMethod; // what kind of color quantization?
- extern Boolean gTooBigForPICT; // true if X size too big to save/display as PICT
- extern Boolean gDoingVirtualFile; // true if doing virtual image buffering
-
-
- /*==== prototypes ====*/
- void InitImageWindow(void);
- void KillImageWindow(void);
- void SetupOffscreen(void);
- void KillOffscreen(void);
- void SetupPalettes(void);
- void CloseImageWindow(void);
- void InvalRect_ImageWindow(Boolean DoWholeWindow);
- void DoResizeImageWindow(WindowPtr w, short h, short v);
- void DoGrowImageWindow(WindowPtr w, Point p);
- void SetImageWindowMag(short magMenuItem);
- void UpdateImageWindow(void);
-
- void make_undo(void);
- void undo_image(void);
- void revert_image(void);
-
- void open_virtual(void);
- void delete_virtual(void);
- void dispose_virtual(void);
- void swap_virtual_segment(short y);
-
- void SetCustomPalette(Boolean doScreenUpdate);
- void paint_to_picture(short do_disk_buffer);
-
- char * BuildImageFileName(int animSuffix);
- void SaveOutputFile(Boolean getName, ComponentInstance ci);
-
- // NOTE: Out of necessity, these prototypes are duplicated in CONFIG.H
- void POV_Mac_Display_Init(int width, int height);
- void POV_Mac_Display_Plot(int x, int y,
- unsigned int Red, unsigned int Green, unsigned int Blue, unsigned int Alpha);
- void POV_Mac_Display_Plot_Rect (int x1, int x2, int y1, int y2,
- unsigned int Red, unsigned int Green, unsigned int Blue, unsigned int Alpha);
- void POV_Mac_Display_Finished(void);
- void POV_Mac_Display_Close(void);
-
-
- #endif // IMAGEWINDOW_H
-
-
-